package org.yenn.pattern.aliyun.structural.bridge;

import org.junit.Test;
import org.yenn.pattern.aliyun.structural.bridge.impl.GreenCircle;
import org.yenn.pattern.aliyun.structural.bridge.impl.RedCircle;

import static org.junit.Assert.*;

/**
 * 步骤 5
 * 使用 Shape 和 DrawAPI 类画出不同颜色的圆。
 */
public class BridgePatternDemo {
    /**
     * 步骤 6
     * 验证输出。
     *
     * Drawing Circle[ color: red, radius: 10, x: 100, 100]
     * Drawing Circle[  color: green, radius: 10, x: 100, 100]
     */
    @Test
    public void drawCircle() {

        Shape redCircle = new Circle(100,100, 10, new RedCircle());
        redCircle.draw();


        Shape greenCircle = new Circle(100,100, 10, new GreenCircle());
        greenCircle.draw();
    }
}